#ifndef _USART_COM_H__
#define _USART_COM_H__
#include "gd32f10x.h"

#define HEX_HEAD 0XFF
#define HEX_TAIL 0X00
#define LED_ID 0X01
#define RELAY_ID 0X02
#define LED_ON 0X01
#define LED_OFF 0X02
#define RELAY_CONNECT 0X01
#define RELAY_DISCONNECT 0X02
//初始化usart0
void usart0_init(uint32_t baudval);
//发送一个字节
void usart0_send_byte(uint8_t ch);
//发送一个字符串
void usart0_send_string(uint8_t *ch);
//数据处理
void data_handle(void);

#endif
